#pragma once

#include "mswin/work_thread.h"
#include "mswin/order_queue.h"
class CXSegment;

//Segment is frozen in GUI after placing it in Processer queue
typedef CXSegment * ProcessOrder;

///overloaded methods of ProcessQueue change enqueued CXSegment status also
class ProcessQueue : public mswin::OrderQueue<ProcessOrder>
{
public:
	typedef mswin::OrderQueue<ProcessOrder> superclass;
public:
	void Clear();
	void Remove(CXSegment * pSegm);
};

class Processor : public mswin::WorkThread<ProcessQueue>
{
public:
	typedef mswin::WorkThread<ProcessQueue> superclass;
	Processor();
	~Processor();

protected:
	virtual void report_error(const char * msg);

private:
	virtual void Execute(const ProcessOrder & pSegm);
};
